package andy.ham;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;


public class SplashScreen extends Activity {

    protected void onCreate(Bundle savedInstanceState) {//定义一个Bundle类
        super.onCreate(savedInstanceState);//启动savedInstanceState
        setContentView(R.layout.splash);//启动splash.xml布局文件，显示启动画面
        //Handler对线程进行管理，进行延迟
        new Handler().postDelayed(new Runnable() {
            public void run() {
                Intent mainIntent = new Intent(SplashScreen.this, LifeDiary.class);
                SplashScreen.this.startActivity(mainIntent);
                SplashScreen.this.finish();
            }
        }, 2000);
    }

}
